const {log} = console
function objGroup(obj1,obj2){
    obj1.next = obj2
    // obj2.prev = obj1
    return {
        // o1: obj1,
        o2: obj2
    }
}
let obj = objGroup({name:'obj1'},{name:'obj2'})
log(obj) // => 无注释，有obj1和obj2
/*
{
  o1: { name: 'obj1', next: { name: 'obj2', prev: [Circular] } },
  o2: { name: 'obj2', prev: { name: 'obj1', next: [Circular] } }
}
 */
log(obj) // => obj的获取渠道都被注释后，{ o2: { name: 'obj2' } }
// obj1就是垃圾了

function fn(){
    name1 = 1
    name2 = 2
}
fn()
console.log(name1)